<?php
require_once("conn.php");
require_once("functions.php");
//echo "<pre>";
//print_r($config);
$sql = "select * from `link` where type = 2";
$row_user = $mysql->query($sql);
echo '微有趣收徒系统目前暂停使用';
die();
?>
<html>
	<head>
		<meta charset="UTF-8">
		<title>微有趣</title>
		<meta name="keywords" content=""/>
		<meta name="description" content=""/>
		<meta name="apple-mobile-web-app-capable" content="yes"/>
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no">
		<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
		<link rel="stylesheet" type="text/css" href="./assets/css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="./assets/css/invite.css"/>
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
		<script>
			function changeSize() {
				var propo = $(window).width() / 640;
				$('html').css('font-size', 40 * propo + 'px');
			};
			changeSize();
			$(window).resize(function() {
				changeSize();
			});
		</script>
	</head>
	<body>
		<div class="wrap">
			<div class="con">
				<div class="user_id">
					ID：<span id="id"></span>
				</div>
				<div class="qr">
					我的二维码
				</div>
				<div class="img1">
					<img src="./assets/images/invite/xc.png"/>
				</div>
				<div class="ms">
					<p>邀请更多好友加入【微有趣】</p>
					<p>赚取金币更容易</p>
				</div>
				<a class="fbtn" id="share">立即分享</a>
				<div class="stms">
					<h2>邀请好友的益处？</h2>
					<p>每成功邀请一位好友成为【微有趣】的用户，好友完成有效阅读可以获得1元红包，好友阅读文章，师傅可以获得积分收入哦！</p>
				</div>
			</div>
		</div>
		<script type="text/javascript">
			function getQueryString(name) {
			    var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
			    var r = window.location.search.substr(1).match(reg);
			    if (r != null) {
			        return unescape(r[2]);
			    }
			    return null;
			}
			$("#id").html(getQueryString("id"));
			$(".qr").click(function(){
				window.location.href = "http://<?php echo $row_user[0]['link']; ?>/weiApp/qrcode.php?id="+getQueryString("id");
			})
			$("#share").click(function(){
				var title = "不用分享就能赚钱的APP，好友越多，收入越多，每天红包领不停。";
				var imgurl = "http://<?php echo $row_user[0]['link']; ?>/weiApp/assets/images/zc/zc.jpg";
				var url = "http://<?php echo $row_user[0]['link']; ?>/weiApp/register.php?pid="+getQueryString("id");
				window.jsObj.share(title,imgurl,url);
			})
		</script>
	</body>
</html>
